Skip to content

feat(llm): add OpenAI Responses provider with GPT-5.6 models - #587

Open
aalhadxx wants to merge 5 commits into
alibaba:mainfrom
aalhadxx:feat-openai-responses-573
Open

feat(llm): add OpenAI Responses provider with GPT-5.6 models#587
aalhadxx wants to merge 5 commits into
alibaba:mainfrom
aalhadxx:feat-openai-responses-573

Conversation

@aalhadxx

Copy link
Copy Markdown

Problem

GPT-5.6 models (gpt-5.6-luna, gpt-5.6-terra, gpt-5.6-sol) require the OpenAI Responses API (/v1/responses). When these models are used with the standard openai provider (which uses /v1/chat/completions), the platform returns:

Function tools with reasoning_effort are not supported for gpt-5.6-terra in /v1/chat/completions.

Fix

Add a dedicated openai-responses preset provider that uses ProtocolOpenAIResponses and includes the GPT-5.6 model family. Users can now select this provider to use these models without manual protocol configuration.

Test

  • Updated TestListProviders_Order to include the new provider.
  • Added TestLookupProvider_OpenAIResponsesModels to verify the provider exists, uses the correct protocol, and lists the expected models.

Fixes #573
Closes #559

On Windows, npm is shipped as npm.cmd. Without shell: true, Node's
spawn fails to execute batch files, causing the VS Code extension to
falsely report 'npm not detected' even when it is installed.

The install() method already used this flag; apply the same fix to
probeCommand (environment detection) and runRaw (CLI execution).

Fixes alibaba#453
@CLAassistant

CLAassistant commented Jul 29, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@github-actions

github-actions Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

🔍 OpenCodeReview found 3 issue(s) in this PR.

  • ✅ Successfully posted inline: 3 comment(s)

Comment thread cmd/opencodereview/config_cmd.go Outdated
Comment thread cmd/opencodereview/config_cmd.go
Comment thread extensions/vscode/src/extension/services/CliService.ts
aalhadxx added 4 commits July 29, 2026 23:54
Reverts shell: true in runRaw to address security feedback:
runRaw args may include user-controlled values (opts.from, opts.to,
opts.customPrompt), and shell mode could interpret cmd.exe
metacharacters.

Keep shell: true only in probeCommand where args are known-safe
(--version). The original bug (alibaba#453) was specifically about
environment detection failing on Windows, so this targeted fix is
sufficient.
…ive provider

When a provider is active, llm.* settings are discarded at runtime because
the resolver checks cfg.Provider first and invokes tryProviderConfig,
leaving tryLegacyLlmConfig as the fallback path.

- runConfigSet: issue a stderr warning when llm.* values are written
  while a provider is present.
- runConfigUnset: enable unsetting the provider and model fields.

Fixes alibaba#583
GPT-5.6 models (luna, terra, sol) require the OpenAI Responses API
(/v1/responses) instead of the legacy Chat Completions endpoint. Using
these models with the standard openai provider causes 400 errors because
the Responses API is the only endpoint that supports reasoning_effort
with these models.

Add a dedicated openai-responses preset that uses ProtocolOpenAIResponses
so users can select these models without manual protocol configuration.

Fixes alibaba#573
Closes alibaba#559
- Improve warning wording: clarify that llm.* values are saved but
  will have no effect while a provider is active.
- Fix unset model: when a provider is active, clear the model from
  the provider entry (not just cfg.Model), matching the set logic.
- Add warning when unsetting provider also clears the model.
@aalhadxx
aalhadxx force-pushed the feat-openai-responses-573 branch from cb71a68 to e4eb1eb Compare July 29, 2026 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants